<template>
  <div>Child</div>
  <!-- <p>{{ modelValue }}</p>
  <button @click="$emit('update:modelValue', modelValue + 1)">+</button> -->

  <p>{{ count }}</p>
  <button @click="$emit('update:count', count + 1)">+</button>
</template>

<script lang="ts">
export default {
  name: "Child",
};
</script>

<script lang="ts" setup>
// 声明接受自定义事件
defineEmits([
  // "update:modelValue",
  "update:count",
]);

defineProps<{
  // modelValue: number;
  count: number;
}>();
</script>

<style scoped></style>
